<?php
	header("Content-type:text/html;charset=utf-8");
	include "../functions.php";
	//CTRL+R 刷新页面  可以刷新源码页  firefox
	// $str  ='houdunw\tang.com\\\\www.$hdphp.com';
	// $str2 = "\\\\www.houdun\\twang.\$com";//第1层意思  转义符   第2层普通字符串\  $变量前缀  $普通字符串
	// echo $str;
	// echo "<br/>".$str2;

	//pow  mt_rand
	//strlen(); 获得字符串长度
	// $s = "  abc   ";
	// echo strlen(trim($s));
	// $houdunwang  = "abc";
	// echo trim($houdunwang,"c");
	// echo trim('d:/wamp/www/yc1/','/');
	// $path =  "/var/www/html/hdphp/";
	// echo rtrim($path,'/');
	// p($_SERVER);
	// echo ABC;
	// echo $_SERVER["DOCUMENT_ROOT"];
	// echo strtoupper("abc");
	// echo strtoupper("abc");
	// echo str_pad("houdunwang",20,'#',STR_PAD_BOTH);
	$user=array(
		0=>array(
			"name"=>"李四",
			"tel"=>"13223232323"
		),
		1=>array(
			"name"=>"后盾网",
			"tel"=>"15223232323"
		),
		2=>array(
			"name"=>"后盾向军",
			"tel"=>"16223232323"
		)
	);
	//substr();
	// echo substr("houdunwang",1,-4);
	$index = mt_rand(0,count($user)-1);

?>
<h1>恭喜<span style='color:#f00'><?php echo $user[$index]['name'];?></span>中奖了<br/>
	你的手机号是：<?php echo str_pad(substr($user[$index]['tel'],0,-4),11,"*");?>
	<br/>
	IPHONE 5即将送到你手中!!!</h1>
